﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using DLM.Infrastructure.Domain;

namespace DLM.Domain.Model
{
    public class Friend : IValidatableObject, IAggregateRoot
    {
        public int FriendID { get; set; }
        [RegularExpression(@"^[0-9]*$", ErrorMessage = "请输入正确的用户编号！")]
        public Nullable<int> UserID { get; set; }

        [RegularExpression(@"^[0-9]*$", ErrorMessage = "请输入正确的用户编号！")]
        public int MyFriendID { get; set; }
        public System.DateTime CreateDate { get; set; }
        public bool IsConfirmed { get; set; }

        public virtual User User { get; set; }

        public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
        {
            return null;
        }
    }
}
